package com.niuwa.p2p.service.job;

import java.util.List;

import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.niuwa.p2p.entity.custservice.CustServiceUser;
import com.niuwa.p2p.service.custService.ICustServiceService;

/**
 * @author futianliang
 * @date 2015年4月30日
 */
@Component("custSeviceBindCustomerWithTelJob")
public class CustSeviceBindCustomerWithTelJob {
	@Autowired
	private ICustServiceService custServiceService;

	public void run() {
		List<CustServiceUser> list = custServiceService.getCustServiceAndCustomerWithTel();
		if (!CollectionUtils.isEmpty(list)) {
			for (CustServiceUser user : list) {
				user.setIsStrange("N");
				custServiceService.update(user);
			}
		}
	}
}
